3.1.71 \(\int \sec ^9(c+d x) (a \cos (c+d x)+b \sin (c+d x))^3 \, dx\) [71]

3.1.71.1 Optimal result
3.1.71.2 Mathematica [A] (verified)
3.1.71.3 Rubi [A] (verified)
3.1.71.4 Maple [A] (verified)
3.1.71.5 Fricas [A] (verification not implemented)
3.1.71.6 Sympy [F(-1)]
3.1.71.7 Maxima [A] (verification not implemented)
3.1.71.8 Giac [A] (verification not implemented)
3.1.71.9 Mupad [B] (verification not implemented)

3.1.71.1 Optimal result

Integrand size = 28, antiderivative size = 174 \[ \int \sec ^9(c+d x) (a \cos (c+d x)+b \sin (c+d x))^3 \, dx=\frac {a^3 \tan (c+d x)}{d}+\frac {3 a^2 b \tan ^2(c+d x)}{2 d}+\frac {a \left (2 a^2+3 b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {b \left (6 a^2+b^2\right ) \tan ^4(c+d x)}{4 d}+\frac {a \left (a^2+6 b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {b \left (3 a^2+2 b^2\right ) \tan ^6(c+d x)}{6 d}+\frac {3 a b^2 \tan ^7(c+d x)}{7 d}+\frac {b^3 \tan ^8(c+d x)}{8 d} \]

output
a^3*tan(d*x+c)/d+3/2*a^2*b*tan(d*x+c)^2/d+1/3*a*(2*a^2+3*b^2)*tan(d*x+c)^3 
/d+1/4*b*(6*a^2+b^2)*tan(d*x+c)^4/d+1/5*a*(a^2+6*b^2)*tan(d*x+c)^5/d+1/6*b 
*(3*a^2+2*b^2)*tan(d*x+c)^6/d+3/7*a*b^2*tan(d*x+c)^7/d+1/8*b^3*tan(d*x+c)^ 
8/d
 
3.1.71.2 Mathematica [A] (verified)

Time = 0.59 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.66 \[ \int \sec ^9(c+d x) (a \cos (c+d x)+b \sin (c+d x))^3 \, dx=\frac {\frac {1}{4} \left (a^2+b^2\right )^2 (a+b \tan (c+d x))^4-\frac {4}{5} a \left (a^2+b^2\right ) (a+b \tan (c+d x))^5+\frac {1}{3} \left (3 a^2+b^2\right ) (a+b \tan (c+d x))^6-\frac {4}{7} a (a+b \tan (c+d x))^7+\frac {1}{8} (a+b \tan (c+d x))^8}{b^5 d} \]

input
Integrate[Sec[c + d*x]^9*(a*Cos[c + d*x] + b*Sin[c + d*x])^3,x]
 
output
(((a^2 + b^2)^2*(a + b*Tan[c + d*x])^4)/4 - (4*a*(a^2 + b^2)*(a + b*Tan[c 
+ d*x])^5)/5 + ((3*a^2 + b^2)*(a + b*Tan[c + d*x])^6)/3 - (4*a*(a + b*Tan[ 
c + d*x])^7)/7 + (a + b*Tan[c + d*x])^8/8)/(b^5*d)
 
3.1.71.3 Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 156, normalized size of antiderivative = 0.90, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3042, 3567, 522, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \sec ^9(c+d x) (a \cos (c+d x)+b \sin (c+d x))^3 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(a \cos (c+d x)+b \sin (c+d x))^3}{\cos (c+d x)^9}dx\)

\(\Big \downarrow \) 3567

\(\displaystyle -\frac {\int (b+a \cot (c+d x))^3 \left (\cot ^2(c+d x)+1\right )^2 \tan ^9(c+d x)d\cot (c+d x)}{d}\)

\(\Big \downarrow \) 522

\(\displaystyle -\frac {\int \left (b^3 \tan ^9(c+d x)+3 a b^2 \tan ^8(c+d x)+\left (2 b^3+3 a^2 b\right ) \tan ^7(c+d x)+\left (a^3+6 b^2 a\right ) \tan ^6(c+d x)+\left (b^3+6 a^2 b\right ) \tan ^5(c+d x)+\left (2 a^3+3 b^2 a\right ) \tan ^4(c+d x)+3 a^2 b \tan ^3(c+d x)+a^3 \tan ^2(c+d x)\right )d\cot (c+d x)}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {-a^3 \tan (c+d x)-\frac {1}{6} b \left (3 a^2+2 b^2\right ) \tan ^6(c+d x)-\frac {1}{5} a \left (a^2+6 b^2\right ) \tan ^5(c+d x)-\frac {1}{4} b \left (6 a^2+b^2\right ) \tan ^4(c+d x)-\frac {1}{3} a \left (2 a^2+3 b^2\right ) \tan ^3(c+d x)-\frac {3}{2} a^2 b \tan ^2(c+d x)-\frac {3}{7} a b^2 \tan ^7(c+d x)-\frac {1}{8} b^3 \tan ^8(c+d x)}{d}\)

input
Int[Sec[c + d*x]^9*(a*Cos[c + d*x] + b*Sin[c + d*x])^3,x]
 
output
-((-(a^3*Tan[c + d*x]) - (3*a^2*b*Tan[c + d*x]^2)/2 - (a*(2*a^2 + 3*b^2)*T 
an[c + d*x]^3)/3 - (b*(6*a^2 + b^2)*Tan[c + d*x]^4)/4 - (a*(a^2 + 6*b^2)*T 
an[c + d*x]^5)/5 - (b*(3*a^2 + 2*b^2)*Tan[c + d*x]^6)/6 - (3*a*b^2*Tan[c + 
 d*x]^7)/7 - (b^3*Tan[c + d*x]^8)/8)/d)
 

3.1.71.3.1 Defintions of rubi rules used

rule 522
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. 
), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], 
x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3567
Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*si 
n[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[-d^(-1)   Subst[Int[x^m*((b 
+ a*x)^n/(1 + x^2)^((m + n + 2)/2)), x], x, Cot[c + d*x]], x] /; FreeQ[{a, 
b, c, d}, x] && IntegerQ[n] && IntegerQ[(m + n)/2] && NeQ[n, -1] &&  !(GtQ[ 
n, 0] && GtQ[m, 1])
 
3.1.71.4 Maple [A] (verified)

Time = 1.51 (sec) , antiderivative size = 147, normalized size of antiderivative = 0.84

method result size
parts \(-\frac {a^{3} \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )}{d}+\frac {b^{3} \left (\frac {\sec \left (d x +c \right )^{8}}{8}-\frac {\sec \left (d x +c \right )^{6}}{6}\right )}{d}+\frac {3 a \,b^{2} \left (\frac {\sin \left (d x +c \right )^{3}}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \sin \left (d x +c \right )^{3}}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \sin \left (d x +c \right )^{3}}{105 \cos \left (d x +c \right )^{3}}\right )}{d}+\frac {a^{2} b \sec \left (d x +c \right )^{6}}{2 d}\) \(147\)
derivativedivides \(\frac {-a^{3} \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )+\frac {a^{2} b}{2 \cos \left (d x +c \right )^{6}}+3 a \,b^{2} \left (\frac {\sin \left (d x +c \right )^{3}}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \sin \left (d x +c \right )^{3}}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \sin \left (d x +c \right )^{3}}{105 \cos \left (d x +c \right )^{3}}\right )+b^{3} \left (\frac {\sin \left (d x +c \right )^{4}}{8 \cos \left (d x +c \right )^{8}}+\frac {\sin \left (d x +c \right )^{4}}{12 \cos \left (d x +c \right )^{6}}+\frac {\sin \left (d x +c \right )^{4}}{24 \cos \left (d x +c \right )^{4}}\right )}{d}\) \(173\)
default \(\frac {-a^{3} \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )+\frac {a^{2} b}{2 \cos \left (d x +c \right )^{6}}+3 a \,b^{2} \left (\frac {\sin \left (d x +c \right )^{3}}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \sin \left (d x +c \right )^{3}}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \sin \left (d x +c \right )^{3}}{105 \cos \left (d x +c \right )^{3}}\right )+b^{3} \left (\frac {\sin \left (d x +c \right )^{4}}{8 \cos \left (d x +c \right )^{8}}+\frac {\sin \left (d x +c \right )^{4}}{12 \cos \left (d x +c \right )^{6}}+\frac {\sin \left (d x +c \right )^{4}}{24 \cos \left (d x +c \right )^{4}}\right )}{d}\) \(173\)
risch \(-\frac {16 \left (-7 i a^{3}-322 i a^{3} {\mathrm e}^{6 i \left (d x +c \right )}-210 a^{2} b \,{\mathrm e}^{10 i \left (d x +c \right )}+70 b^{3} {\mathrm e}^{10 i \left (d x +c \right )}-70 i a^{3} {\mathrm e}^{10 i \left (d x +c \right )}-42 i a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}-420 a^{2} b \,{\mathrm e}^{8 i \left (d x +c \right )}-70 b^{3} {\mathrm e}^{8 i \left (d x +c \right )}+84 i a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+3 i a \,b^{2}-210 a^{2} b \,{\mathrm e}^{6 i \left (d x +c \right )}+70 b^{3} {\mathrm e}^{6 i \left (d x +c \right )}-245 i a^{3} {\mathrm e}^{8 i \left (d x +c \right )}+105 i a \,b^{2} {\mathrm e}^{8 i \left (d x +c \right )}+24 i a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+210 i a \,b^{2} {\mathrm e}^{10 i \left (d x +c \right )}-196 i a^{3} {\mathrm e}^{4 i \left (d x +c \right )}-56 i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}\right )}{105 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{8}}\) \(275\)
parallelrisch \(-\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (-105 a^{3}+84 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a \,b^{2}-280 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9} b^{3}-700 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7} b^{3}-280 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} b^{3}-210 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} b^{3}+1141 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10} a^{3}-1883 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8} a^{3}-1365 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9} a^{2} b +2100 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7} a^{2} b -1365 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} a^{2} b +630 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} a^{2} b -315 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a^{2} b -315 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{13} a^{2} b +420 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12} a \,b^{2}+630 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11} a^{2} b -84 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10} a \,b^{2}+1032 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8} a \,b^{2}-1032 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6} a \,b^{2}+1883 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6} a^{3}-1141 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a^{3}+455 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a^{3}-420 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a \,b^{2}+105 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{14}-455 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12} a^{3}-210 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11} b^{3}\right )}{105 d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{8}}\) \(447\)

input
int(sec(d*x+c)^9*(cos(d*x+c)*a+b*sin(d*x+c))^3,x,method=_RETURNVERBOSE)
 
output
-a^3/d*(-8/15-1/5*sec(d*x+c)^4-4/15*sec(d*x+c)^2)*tan(d*x+c)+b^3/d*(1/8*se 
c(d*x+c)^8-1/6*sec(d*x+c)^6)+3*a*b^2/d*(1/7*sin(d*x+c)^3/cos(d*x+c)^7+4/35 
*sin(d*x+c)^3/cos(d*x+c)^5+8/105*sin(d*x+c)^3/cos(d*x+c)^3)+1/2*a^2*b/d*se 
c(d*x+c)^6
 
3.1.71.5 Fricas [A] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 128, normalized size of antiderivative = 0.74 \[ \int \sec ^9(c+d x) (a \cos (c+d x)+b \sin (c+d x))^3 \, dx=\frac {105 \, b^{3} + 140 \, {\left (3 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{2} + 8 \, {\left (8 \, {\left (7 \, a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{7} + 4 \, {\left (7 \, a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{5} + 45 \, a b^{2} \cos \left (d x + c\right ) + 3 \, {\left (7 \, a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )}{840 \, d \cos \left (d x + c\right )^{8}} \]

input
integrate(sec(d*x+c)^9*(a*cos(d*x+c)+b*sin(d*x+c))^3,x, algorithm="fricas" 
)
 
output
1/840*(105*b^3 + 140*(3*a^2*b - b^3)*cos(d*x + c)^2 + 8*(8*(7*a^3 - 3*a*b^ 
2)*cos(d*x + c)^7 + 4*(7*a^3 - 3*a*b^2)*cos(d*x + c)^5 + 45*a*b^2*cos(d*x 
+ c) + 3*(7*a^3 - 3*a*b^2)*cos(d*x + c)^3)*sin(d*x + c))/(d*cos(d*x + c)^8 
)
 
3.1.71.6 Sympy [F(-1)]

Timed out. \[ \int \sec ^9(c+d x) (a \cos (c+d x)+b \sin (c+d x))^3 \, dx=\text {Timed out} \]

input
integrate(sec(d*x+c)**9*(a*cos(d*x+c)+b*sin(d*x+c))**3,x)
 
output
Timed out
 
3.1.71.7 Maxima [A] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 154, normalized size of antiderivative = 0.89 \[ \int \sec ^9(c+d x) (a \cos (c+d x)+b \sin (c+d x))^3 \, dx=\frac {56 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} a^{3} + 24 \, {\left (15 \, \tan \left (d x + c\right )^{7} + 42 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3}\right )} a b^{2} + \frac {35 \, {\left (4 \, \sin \left (d x + c\right )^{2} - 1\right )} b^{3}}{\sin \left (d x + c\right )^{8} - 4 \, \sin \left (d x + c\right )^{6} + 6 \, \sin \left (d x + c\right )^{4} - 4 \, \sin \left (d x + c\right )^{2} + 1} - \frac {420 \, a^{2} b}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{3}}}{840 \, d} \]

input
integrate(sec(d*x+c)^9*(a*cos(d*x+c)+b*sin(d*x+c))^3,x, algorithm="maxima" 
)
 
output
1/840*(56*(3*tan(d*x + c)^5 + 10*tan(d*x + c)^3 + 15*tan(d*x + c))*a^3 + 2 
4*(15*tan(d*x + c)^7 + 42*tan(d*x + c)^5 + 35*tan(d*x + c)^3)*a*b^2 + 35*( 
4*sin(d*x + c)^2 - 1)*b^3/(sin(d*x + c)^8 - 4*sin(d*x + c)^6 + 6*sin(d*x + 
 c)^4 - 4*sin(d*x + c)^2 + 1) - 420*a^2*b/(sin(d*x + c)^2 - 1)^3)/d
 
3.1.71.8 Giac [A] (verification not implemented)

Time = 0.40 (sec) , antiderivative size = 166, normalized size of antiderivative = 0.95 \[ \int \sec ^9(c+d x) (a \cos (c+d x)+b \sin (c+d x))^3 \, dx=\frac {105 \, b^{3} \tan \left (d x + c\right )^{8} + 360 \, a b^{2} \tan \left (d x + c\right )^{7} + 420 \, a^{2} b \tan \left (d x + c\right )^{6} + 280 \, b^{3} \tan \left (d x + c\right )^{6} + 168 \, a^{3} \tan \left (d x + c\right )^{5} + 1008 \, a b^{2} \tan \left (d x + c\right )^{5} + 1260 \, a^{2} b \tan \left (d x + c\right )^{4} + 210 \, b^{3} \tan \left (d x + c\right )^{4} + 560 \, a^{3} \tan \left (d x + c\right )^{3} + 840 \, a b^{2} \tan \left (d x + c\right )^{3} + 1260 \, a^{2} b \tan \left (d x + c\right )^{2} + 840 \, a^{3} \tan \left (d x + c\right )}{840 \, d} \]

input
integrate(sec(d*x+c)^9*(a*cos(d*x+c)+b*sin(d*x+c))^3,x, algorithm="giac")
 
output
1/840*(105*b^3*tan(d*x + c)^8 + 360*a*b^2*tan(d*x + c)^7 + 420*a^2*b*tan(d 
*x + c)^6 + 280*b^3*tan(d*x + c)^6 + 168*a^3*tan(d*x + c)^5 + 1008*a*b^2*t 
an(d*x + c)^5 + 1260*a^2*b*tan(d*x + c)^4 + 210*b^3*tan(d*x + c)^4 + 560*a 
^3*tan(d*x + c)^3 + 840*a*b^2*tan(d*x + c)^3 + 1260*a^2*b*tan(d*x + c)^2 + 
 840*a^3*tan(d*x + c))/d
 
3.1.71.9 Mupad [B] (verification not implemented)

Time = 23.09 (sec) , antiderivative size = 156, normalized size of antiderivative = 0.90 \[ \int \sec ^9(c+d x) (a \cos (c+d x)+b \sin (c+d x))^3 \, dx=\frac {{\cos \left (c+d\,x\right )}^3\,\left (\frac {a^3\,\sin \left (c+d\,x\right )}{5}-\frac {3\,a\,b^2\,\sin \left (c+d\,x\right )}{35}\right )+{\cos \left (c+d\,x\right )}^5\,\left (\frac {4\,a^3\,\sin \left (c+d\,x\right )}{15}-\frac {4\,a\,b^2\,\sin \left (c+d\,x\right )}{35}\right )+{\cos \left (c+d\,x\right )}^7\,\left (\frac {8\,a^3\,\sin \left (c+d\,x\right )}{15}-\frac {8\,a\,b^2\,\sin \left (c+d\,x\right )}{35}\right )+{\cos \left (c+d\,x\right )}^2\,\left (\frac {a^2\,b}{2}-\frac {b^3}{6}\right )+\frac {b^3}{8}+\frac {3\,a\,b^2\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )}{7}}{d\,{\cos \left (c+d\,x\right )}^8} \]

input
int((a*cos(c + d*x) + b*sin(c + d*x))^3/cos(c + d*x)^9,x)
 
output
(cos(c + d*x)^3*((a^3*sin(c + d*x))/5 - (3*a*b^2*sin(c + d*x))/35) + cos(c 
 + d*x)^5*((4*a^3*sin(c + d*x))/15 - (4*a*b^2*sin(c + d*x))/35) + cos(c + 
d*x)^7*((8*a^3*sin(c + d*x))/15 - (8*a*b^2*sin(c + d*x))/35) + cos(c + d*x 
)^2*((a^2*b)/2 - b^3/6) + b^3/8 + (3*a*b^2*cos(c + d*x)*sin(c + d*x))/7)/( 
d*cos(c + d*x)^8)